<% def tagAmount = request.tagAmount %>
<script>
<% if(tagAmount != null) { %>
	var tagAmountData = new google.visualization.DataTable();
	tagAmountData.addColumn('string', 'Tag');
	tagAmountData.addColumn('number', 'Amount');
	tagAmountData.addRows(${tagAmount.size()});
	<%
		i = 0;
		tagAmount.each {k, v ->
	%>
	    tagAmountData.setValue(<%=i %>, 0, '<%=k %>[<%=v %>]');
	    tagAmountData.setValue(<%=i %>, 1, <%=v %>);
	<%
			i++;
		}
	%>
	var tagAmountChart = new google.visualization.PieChart(document.getElementById('pieChart'));
	tagAmountChart.draw(tagAmountData, {width: 800, height: 200, is3D: true, title: '', legendFontSize: '14',
		legend: 'label', backgroundColor: {stroke:'white', fill:'white', strokeSize: 0},
		legendBackgroundColor: {stroke:'white', fill:'white', strokeSize: 0}});     
<% } %>

</script>